//
//  DCMarketViewController.m
//  JiuyaoMotorcade
//
//  Created by 大橙子 on 2018/11/28.
//  Copyright © 2018 Tomous. All rights reserved.
//

#import "DCMarketViewController.h"
#import "DCSendOrderViewController.h"
#import "DCQuotationViewController.h"
#import "DCRobViewController.h"
@interface DCMarketViewController ()
@property (nonatomic, strong) ZWMSegmentController *segmentVC;

@end

@implementation DCMarketViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    DCSendOrderViewController *sendOrderVC = [[DCSendOrderViewController alloc] init];
    DCQuotationViewController *quotationVC = [[DCQuotationViewController alloc] init];
    DCRobViewController *robVC = [[DCRobViewController alloc] init];
    
    NSArray *array = @[sendOrderVC,quotationVC,robVC];
    
    self.segmentVC = [ZWMSegmentController segmentControllerWithFrame:self.view.bounds Titles:@[@"发货单",@"待报价",@"待抢单"] type:0];
    self.segmentVC.segmentView.showSeparateLine = YES;
    self.segmentVC.segmentView.segmentTintColor = BlueColor;
    self.segmentVC.viewControllers = [array copy];
    if (array.count==1) {
        self.segmentVC.segmentView.style=ZWMSegmentStyleDefault;
    } else {
        self.segmentVC.segmentView.style=ZWMSegmentStyleFlush;
    }
    [self.segmentVC  enumerateBadges:@[@"10",@"21",@"13"]];
    [self addSegmentController:self.segmentVC];
    [self.segmentVC  setSelectedAtIndex:0];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
